package com.nanachi.feign.core;

import java.lang.reflect.InvocationHandler;
import java.util.Map;

/**
 * @author yuhongtai
 * 代理类工厂
 */
public interface InvocationHandlerFactory {

    InvocationHandler create(Map<String, MethodHandler> methodHandlerMap);


    interface MethodHandler{

        /**
         * 和反射一样的作用
         * @param args
         * @return
         */
        Object invoke(Object[] args);

    }

    class Default implements InvocationHandlerFactory{
        @Override
        public InvocationHandler create(Map<String, MethodHandler> methodHandlerMap) {

            return null;
        }
    }

}
